package com.hongyue.shiJian3;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Scanner;

public class Demo {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入日期(例2000-01-01)");
        String a = sc.nextLine();
        a += " 11:11:11";
        DateTimeFormatter da = DateTimeFormatter.ofPattern("yyyy年MM月dd日 HH:mm:ss");
        DateTimeFormatter da1 = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        LocalDateTime parse = LocalDateTime.parse(a, da1);
        String fo = parse.format(da);
        System.out.println(fo.substring(0, 11));
    }
}
